﻿''' <summary>
''' Provides extension methods to the <see cref="IDataReader">IDataReader</see> object.
''' </summary>
''' <revisions>
'''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
''' </revisions>
Public Module IDataReaderExtensions

  ''' <summary>
  ''' Gets the value of the specified column as a Boolean.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <returns>The <see cref="Boolean">Boolean</see> value of the column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a Boolean, or an exception is generated.</remarks>
  ''' <example>
  '''   <para>The following examples checks a checkbox based upon the Processed boolean value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       chkProcessed.Checked = drPageData.GetBooleanValue("Processed")
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	chkProcessed.Checked = drPageData.GetBooleanValue("Processed");
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetBooleanValue(ByVal input As IDataReader, _
                                                ByVal columnName As String) As Boolean
    Return GetBooleanValue(input, columnName, False)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a Boolean.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <param name="nullValue">The <see cref="Boolean">Boolean</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Boolean">Boolean</see> value of the column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a Boolean, or an exception is generated.</remarks>
  ''' <example>
  '''   <para>The following examples checks a checkbox based upon the Processed boolean value from the database specifying False if the database is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       chkProcessed.Checked = drPageData.GetBooleanValue("Processed", False)
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	chkProcessed.Checked = drPageData.GetBooleanValue("Processed", false);
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetBooleanValue(ByVal input As IDataReader, _
                                                ByVal columnName As String, _
                                                ByVal nullValue As Boolean) As Boolean

    ' Variable Declarations
    Dim bReturnValue As Boolean

    ' Get the value from the data reader
    Try
      Dim intOrdinal As Integer = input.GetOrdinal(columnName)
      If input.IsDBNull(intOrdinal) = False Then
        bReturnValue = input.GetBoolean(intOrdinal)
      Else
        bReturnValue = nullValue
      End If
    Catch ex As Exception
      bReturnValue = nullValue
    End Try

    ' Return the results
    Return bReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a Boolean.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <returns>The <see cref="Boolean">Boolean</see> value of the column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a Boolean, or an exception is generated.</remarks>
  ''' <example>
  '''   <para>The following examples checks a checkbox based upon the 10th database column.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       chkProcessed.Checked = drPageData.GetBooleanValue(10)
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	chkProcessed.Checked = drPageData.GetBooleanValue(10);
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetBooleanValue(ByVal input As IDataReader, _
                                                ByVal columnIndex As Integer) As Boolean
    Return GetBooleanValue(input, columnIndex, False)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a Boolean.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <param name="nullValue">The <see cref="Boolean">Boolean</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Boolean">Boolean</see> value of the column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a Boolean, or an exception is generated.</remarks>
  ''' <example>
  '''   <para>The following examples checks a checkbox based upon the 10th database column specifying False if the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       chkProcessed.Checked = drPageData.GetBooleanValue(10, False)
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	chkProcessed.Checked = drPageData.GetBooleanValue(10, False);
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetBooleanValue(ByVal input As IDataReader, _
                                                ByVal columnIndex As Integer, _
                                                ByVal nullValue As Boolean) As Boolean

    ' Variable Declarations
    Dim bReturnValue As Boolean

    ' Get the value from the data reader
    Try
      If input.IsDBNull(columnIndex) = False Then
        bReturnValue = input.GetBoolean(columnIndex)
      Else
        bReturnValue = nullValue
      End If
    Catch ex As Exception
      bReturnValue = nullValue
    End Try

    ' Return the results
    Return bReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a byte.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <returns>The <see cref="Byte">Byte</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a string.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the tinyInt value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtSmallValue.Text = drPageData.GetByteValue("SmallValue").ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtSmallValue.Text = drPageData.GetByteValue("SmallValue").ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetByteValue(ByVal input As IDataReader, _
                                             ByVal columnName As String) As Byte
    Return GetByteValue(input, columnName, 0)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a byte.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <param name="nullValue">The <see cref="String">String</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Byte">Byte</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a string.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the tinyInt value from the database specifying a default value if the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtSmallValue.Text = drPageData.GetByteValue("SmallValue", 100).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtSmallValue.Text = drPageData.GetByteValue("SmallValue", 100).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetByteValue(ByVal input As IDataReader, _
                                             ByVal columnName As String, _
                                             ByVal nullValue As Byte) As Byte

    ' Variable Declarations
    Dim bytReturnValue As Byte

    ' Get the value from the data reader
    Try
      Dim intOrdinal As Integer = input.GetOrdinal(columnName)
      If input.IsDBNull(intOrdinal) = False Then
        bytReturnValue = input.GetByte(intOrdinal)
      Else
        bytReturnValue = nullValue
      End If
    Catch ex As Exception
      bytReturnValue = nullValue
    End Try

    ' Return the results
    Return bytReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a byte.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <returns>The <see cref="Byte">Byte</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a string.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the tinyInt value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtSmallValue.Text = drPageData.GetByteValue(4).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtSmallValue.Text = drPageData.GetByteValue(4).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetByteValue(ByVal input As IDataReader, _
                                             ByVal columnIndex As Integer) As Byte
    Return GetByteValue(input, columnIndex, 0)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a byte.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <param name="nullValue">The <see cref="String">String</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Byte">Byte</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a string.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the tinyInt value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtSmallValue.Text = drPageData.GetByteValue(4, 100).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtSmallValue.Text = drPageData.GetByteValue(4, 100).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetByteValue(ByVal input As IDataReader, _
                                             ByVal columnIndex As Integer, _
                                             ByVal nullValue As Byte) As Byte

    ' Variable Declarations
    Dim bytReturnValue As Byte

    ' Get the value from the data reader
    Try
      If input.IsDBNull(columnIndex) = False Then
        bytReturnValue = input.GetByte(columnIndex)
      Else
        bytReturnValue = nullValue
      End If
    Catch ex As Exception
      bytReturnValue = nullValue
    End Try

    ' Return the results
    Return bytReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a <see cref="DateTime">DateTime</see> object.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <returns>The <see cref="DateTime">DateTime</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a <see cref="DateTime">DateTime</see> object.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the dateTime value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtDateReceived.Text = drPageData.GetDateTimeValue("DateReceived").ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtDateReceived.Text = drPageData.GetDateTimeValue("DateReceived").ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDateTimeValue(ByVal input As IDataReader, _
                                                 ByVal columnName As String) As DateTime
    Return GetDateTimeValue(input, columnName)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a <see cref="DateTime">DateTime</see> object.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <returns>The <see cref="DateTime">DateTime</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a <see cref="DateTime">DateTime</see> object.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the dateTime value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtDateReceived.Text = drPageData.GetDateTimeValue(17).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtDateReceived.Text = drPageData.GetDateTimeValue(17).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDateTimeValue(ByVal input As IDataReader, _
                                                 ByVal columnIndex As Integer) As DateTime
    Return GetDateTimeValue(input, columnIndex)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a <see cref="DateTime">DateTime</see> object.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <param name="nullValue">The <see cref="DateTime">DateTime</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="DateTime">DateTime</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a <see cref="DateTime">DateTime</see> object.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the dateTime value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtDateReceived.Text = drPageData.GetDateTimeValue("DateReceived", Now.AddMonth).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtDateReceived.Text = drPageData.GetDateTimeValue("DateReceived", Now.AddMonth).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDateTimeValue(ByVal input As IDataReader, _
                                                 ByVal columnIndex As Integer, _
                                                 ByVal nullValue As DateTime) As DateTime

    ' Variable Declarations
    Dim dtReturnValue As DateTime

    ' Get the value from the data reader
    Try
      If input.IsDBNull(columnIndex) = False Then
        dtReturnValue = input.GetDateTime(columnIndex)
      Else
        dtReturnValue = nullValue
      End If
    Catch ex As Exception
      dtReturnValue = nullValue
    End Try

    ' Return the results
    Return dtReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a <see cref="DateTime">DateTime</see> object.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <param name="nullValue">The <see cref="DateTime">DateTime</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="DateTime">DateTime</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a <see cref="DateTime">DateTime</see> object.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the dateTime value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtDateReceived.Text = drPageData.GetDateTimeValue(17, Now.AddMonth).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtDateReceived.Text = drPageData.GetDateTimeValue(17, Now.AddMonth).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDateTimeValue(ByVal input As IDataReader, _
                                                 ByVal columnName As String, _
                                                 ByVal nullValue As DateTime) As DateTime

    ' Variable Declarations
    Dim dtReturnValue As DateTime

    ' Get the value from the data reader
    Try
      Dim intOrdinal As Integer = input.GetOrdinal(columnName)
      If input.IsDBNull(intOrdinal) = False Then
        dtReturnValue = input.GetDateTime(intOrdinal)
      Else
        dtReturnValue = nullValue
      End If
    Catch ex As Exception
      dtReturnValue = nullValue
    End Try

    ' Return the results
    Return dtReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a <see cref="Decimal">Decimal</see> object.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <returns>The <see cref="Decimal">Decimal</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a <see cref="Decimal">Decimal</see> object.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the decimal value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtAwardAmount.Text = drPageData.GetDecimalValue("AwardAmount").ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtAwardAmount.Text = drPageData.GetDateTimeValue("AwardAmount").ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDecimalValue(ByVal input As IDataReader, _
                                                ByVal columnName As String) As Decimal
    Return GetDecimalValue(input, columnName)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a <see cref="Decimal">Decimal</see> object.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <param name="nullValue">The <see cref="String">String</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Decimal">Decimal</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a <see cref="Decimal">Decimal</see> object.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the decimal value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtAwardAmount.Text = drPageData.GetDecimalValue("AwardAmount", 0).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtAwardAmount.Text = drPageData.GetDateTimeValue("AwardAmount", 0).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDecimalValue(ByVal input As IDataReader, _
                                                ByVal columnName As String, _
                                                ByVal nullValue As Decimal) As Decimal

    ' Variable Declarations
    Dim decReturnValue As Decimal

    ' Get the value from the data reader
    Try
      Dim intOrdinal As Integer = input.GetOrdinal(columnName)
      If input.IsDBNull(intOrdinal) = False Then
        decReturnValue = input.GetDecimal(intOrdinal)
      Else
        decReturnValue = nullValue
      End If
    Catch ex As Exception
      decReturnValue = nullValue
    End Try

    ' Return the results
    Return decReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a <see cref="Decimal">Decimal</see> object.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <returns>The <see cref="Decimal">Decimal</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a <see cref="Decimal">Decimal</see> object.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the decimal value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtAwardAmount.Text = drPageData.GetDecimalValue(9).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtAwardAmount.Text = drPageData.GetDateTimeValue(9).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDecimalValue(ByVal input As IDataReader, _
                                                ByVal columnIndex As Integer) As Decimal
    Return GetDecimalValue(input, columnIndex)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a <see cref="Decimal">Decimal</see> object.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <param name="nullValue">The <see cref="String">String</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Decimal">Decimal</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a <see cref="Decimal">Decimal</see> object.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the decimal value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtAwardAmount.Text = drPageData.GetDecimalValue(9, 0).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtAwardAmount.Text = drPageData.GetDateTimeValue(9, 0).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDecimalValue(ByVal input As IDataReader, _
                                                ByVal columnIndex As Integer, _
                                                ByVal nullValue As Decimal) As Decimal

    ' Variable Declarations
    Dim decReturnValue As Decimal

    ' Get the value from the data reader
    Try
      If input.IsDBNull(columnIndex) = False Then
        decReturnValue = input.GetDecimal(columnIndex)
      Else
        decReturnValue = nullValue
      End If
    Catch ex As Exception
      decReturnValue = nullValue
    End Try

    ' Return the results
    Return decReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a double-precision floating point number.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <returns>The <see cref="Double">Double</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed. Therefore, the data retrieved must already be a double-precision floating point number.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the double value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtSuccessRate.Text = drPageData.GetDoubleValue("SuccessRate").ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtSuccessRate.Text = drPageData.GetDoubleValue("SuccessRate").ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDoubleValue(ByVal input As IDataReader, _
                                               ByVal columnName As String) As Double
    Return GetDoubleValue(input, columnName)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a double-precision floating point number.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <param name="nullValue">The <see cref="String">String</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Double">Double</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed. Therefore, the data retrieved must already be a double-precision floating point number.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the double value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtSuccessRate.Text = drPageData.GetDoubleValue("SuccessRate", 100).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtSuccessRate.Text = drPageData.GetDoubleValue("SuccessRate", 100).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDoubleValue(ByVal input As IDataReader, _
                                               ByVal columnName As String, _
                                               ByVal nullValue As Double) As Double

    ' Variable Declarations
    Dim dblReturnValue As Double

    ' Get the value from the data reader
    Try
      Dim intOrdinal As Integer = input.GetOrdinal(columnName)
      If input.IsDBNull(intOrdinal) = False Then
        dblReturnValue = input.GetDouble(intOrdinal)
      Else
        dblReturnValue = nullValue
      End If
    Catch ex As Exception
      dblReturnValue = nullValue
    End Try

    ' Return the results
    Return dblReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a double-precision floating point number.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <returns>The <see cref="Double">Double</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed. Therefore, the data retrieved must already be a double-precision floating point number.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the double value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtSuccessRate.Text = drPageData.GetDoubleValue(5).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtSuccessRate.Text = drPageData.GetDoubleValue(5).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDoubleValue(ByVal input As IDataReader, _
                                               ByVal columnIndex As Integer) As Double
    Return GetDoubleValue(input, columnIndex)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a double-precision floating point number.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <param name="nullValue">The <see cref="String">String</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Double">Double</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed. Therefore, the data retrieved must already be a double-precision floating point number.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the double value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtSuccessRate.Text = drPageData.GetDoubleValue(5, 100).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtSuccessRate.Text = drPageData.GetDoubleValue(5, 100).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetDoubleValue(ByVal input As IDataReader, _
                                               ByVal columnIndex As Integer, _
                                               ByVal nullValue As Double) As Double

    ' Variable Declarations
    Dim dblReturnValue As Double

    ' Get the value from the data reader
    Try
      If input.IsDBNull(columnIndex) = False Then
        dblReturnValue = input.GetDouble(columnIndex)
      Else
        dblReturnValue = nullValue
      End If
    Catch ex As Exception
      dblReturnValue = nullValue
    End Try

    ' Return the results
    Return dblReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 16-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <returns>The <see cref="Int16">Int16</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 16-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the smallInt value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtQuantity.Text = drPageData.GetDoubleValue("Quantity").ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtQuantity.Text = drPageData.GetDoubleValue("Quantity").ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt16Value(ByVal input As IDataReader, _
                                              ByVal columnName As String) As Int16
    Return GetInt16Value(input, columnName, 0)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 16-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <param name="nullValue">The <see cref="Int16">Int16</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Int16">Int16</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 16-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the smallInt value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtQuantity.Text = drPageData.GetDoubleValue("Quantity", 0).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtQuantity.Text = drPageData.GetDoubleValue("Quantity", 0).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt16Value(ByVal input As IDataReader, _
                                              ByVal columnName As String, _
                                              ByVal nullValue As Int16) As Int16

    ' Variable Declarations
    Dim shtReturnValue As Int16

    ' Get the value from the data reader
    Try
      Dim intOrdinal As Integer = input.GetOrdinal(columnName)
      If input.IsDBNull(intOrdinal) = False Then
        shtReturnValue = input.GetInt16(intOrdinal)
      Else
        shtReturnValue = nullValue
      End If
    Catch ex As Exception
      shtReturnValue = nullValue
    End Try

    ' Return the results
    Return shtReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 16-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <returns>The <see cref="Int16">Int16</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 16-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the smallInt value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtQuantity.Text = drPageData.GetDoubleValue(3).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtQuantity.Text = drPageData.GetDoubleValue(3).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt16Value(ByVal input As IDataReader, _
                                              ByVal columnIndex As Integer) As Int16
    Return GetInt16Value(input, columnIndex)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 16-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <param name="nullValue">The <see cref="Int16">Int16</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Int16">Int16</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 16-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the smallInt value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtQuantity.Text = drPageData.GetDoubleValue(3, 0).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtQuantity.Text = drPageData.GetDoubleValue(3, 0).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt16Value(ByVal input As IDataReader, _
                                              ByVal columnIndex As Integer, _
                                              ByVal nullValue As Int16) As Int16

    ' Variable Declarations
    Dim shtReturnValue As Int16

    ' Get the value from the data reader
    Try
      If input.IsDBNull(columnIndex) = False Then
        shtReturnValue = input.GetInt16(columnIndex)
      Else
        shtReturnValue = nullValue
      End If
    Catch ex As Exception
      shtReturnValue = nullValue
    End Try

    ' Return the results
    Return shtReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 32-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <returns>The <see cref="String">String</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 32-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the Int value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtPersonID.Text = drPageData.GetInt32Value("PrsnId").ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtPersonID.Text = drPageData.GetInt32Value("PrsnId").ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt32Value(ByVal input As IDataReader, _
                                              ByVal columnName As String) As Int32
    Return GetInt32Value(input, columnName)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 32-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <param name="nullValue">The <see cref="String">String</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="String">String</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 32-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the Int value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtPersonID.Text = drPageData.GetInt32Value("PrsnId", 0).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtPersonID.Text = drPageData.GetInt32Value("PrsnId", 0).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt32Value(ByVal input As IDataReader, _
                                              ByVal columnName As String, _
                                              ByVal nullValue As Int32) As Int32

    ' Variable Declarations
    Dim intReturnValue As Int32

    ' Get the value from the data reader
    Try
      Dim intOrdinal As Integer = input.GetOrdinal(columnName)
      If input.IsDBNull(intOrdinal) = False Then
        intReturnValue = input.GetInt32(intOrdinal)
      Else
        intReturnValue = nullValue
      End If
    Catch ex As Exception
      intReturnValue = nullValue
    End Try

    ' Return the results
    Return intReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 32-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <returns>The <see cref="String">String</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 32-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the Int value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtPersonID.Text = drPageData.GetInt32Value(0).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtPersonID.Text = drPageData.GetInt32Value(0).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt32Value(ByVal input As IDataReader, _
                                              ByVal columnIndex As Integer) As Int32
    Return GetInt32Value(input, columnIndex, 0)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 32-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <param name="nullValue">The <see cref="String">String</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="String">String</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 32-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the Int value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtPersonID.Text = drPageData.GetInt32Value(0, 0).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtPersonID.Text = drPageData.GetInt32Value(0, 0).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt32Value(ByVal input As IDataReader, _
                                              ByVal columnIndex As Integer, _
                                              ByVal nullValue As Int32) As Int32

    ' Variable Declarations
    Dim intReturnValue As Int32

    ' Get the value from the data reader
    Try
      If input.IsDBNull(columnIndex) = False Then
        intReturnValue = input.GetInt32(columnIndex)
      Else
        intReturnValue = nullValue
      End If
    Catch ex As Exception
      intReturnValue = nullValue
    End Try

    ' Return the results
    Return intReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 64-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <returns>The <see cref="Int64">Int64</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 64-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the BigInt value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtUSBudget.Text = drPageData.GetInt64Value("USBudget").ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtUSBudget.Text = drPageData.GetInt64Value("USBudget").ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt64Value(ByVal input As IDataReader, _
                                              ByVal columnName As String) As Int64
    Return GetInt64Value(input, columnName, 0)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 64-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <param name="nullValue">The <see cref="Int64">Int64</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Int64">Int64</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 64-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the BigInt value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtUSBudget.Text = drPageData.GetInt64Value("USBudget", 1000000000000).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtUSBudget.Text = drPageData.GetInt64Value("USBudget", 1000000000000).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt64Value(ByVal input As IDataReader, _
                                                ByVal columnName As String, _
                                                ByVal nullValue As Int64) As Int64

    ' Variable Declarations
    Dim lngReturnValue As Long

    ' Get the value from the data reader
    Try
      Dim intOrdinal As Integer = input.GetOrdinal(columnName)
      If input.IsDBNull(intOrdinal) = False Then
        lngReturnValue = input.GetInt64(intOrdinal)
      Else
        lngReturnValue = nullValue
      End If
    Catch ex As Exception
      lngReturnValue = nullValue
    End Try

    ' Return the results
    Return lngReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 64-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <returns>The <see cref="Int64">Int64</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 64-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the BigInt value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtUSBudget.Text = drPageData.GetInt64Value(6).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtUSBudget.Text = drPageData.GetInt64Value(6).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt64Value(ByVal input As IDataReader, _
                                              ByVal columnIndex As Integer) As Int64
    Return GetInt64Value(input, columnIndex, 0)
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a 64-bit signed integer.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <param name="nullValue">The <see cref="Int64">Int64</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="Int64">Int64</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a 64-bit signed integer.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the BigInt value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtUSBudget.Text = drPageData.GetInt64Value(6, 1000000000000).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtUSBudget.Text = drPageData.GetInt64Value(6, 1000000000000).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetInt64Value(ByVal input As IDataReader, _
                                              ByVal columnIndex As Integer, _
                                              ByVal nullValue As Int64) As Int64

    ' Variable Declarations
    Dim lngReturnValue As Long

    ' Get the value from the data reader
    Try
      If input.IsDBNull(columnIndex) = False Then
        lngReturnValue = input.GetInt64(columnIndex)
      Else
        lngReturnValue = nullValue
      End If
    Catch ex As Exception
      lngReturnValue = nullValue
    End Try

    ' Return the results
    Return lngReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a string.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <returns>The value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a string.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the VarChar (string) value from the database.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtRequisitionNumber.Text = drPageData.GetInt64Value("RequisitionNumber").ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtRequisitionNumber.Text = drPageData.GetInt64Value("RequisitionNumber").ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetStringValue(ByVal input As IDataReader, _
                                               ByVal columnName As String) As String
    Return GetStringValue(input, columnName, "")
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a string.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <param name="nullValue">The <see cref="String">String</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="String">String</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a string.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the VarChar (string) value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtRequisitionNumber.Text = drPageData.GetInt64Value("RequisitionNumber", GenerateRequisitionNumber).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtRequisitionNumber.Text = drPageData.GetInt64Value("RequisitionNumber", GenerateRequisitionNumber()).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetStringValue(ByVal input As IDataReader, _
                                               ByVal columnName As String, _
                                               ByVal nullValue As String) As String

    ' Variable Declarations
    Dim strReturnValue As String

    ' Get the value from the data reader
    Try
      Dim intOrdinal As Integer = input.GetOrdinal(columnName)
      If input.IsDBNull(intOrdinal) = False Then
        strReturnValue = input.GetString(intOrdinal)
      Else
        strReturnValue = nullValue
      End If
    Catch ex As Exception
      strReturnValue = nullValue
    End Try

    ' Return the results
    Return strReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a string.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <returns>The <see cref="String">String</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a string.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the VarChar (string) value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtRequisitionNumber.Text = drPageData.GetInt64Value(3).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtRequisitionNumber.Text = drPageData.GetInt64Value(3).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetStringValue(ByVal input As IDataReader, _
                                               ByVal columnIndex As Integer) As String
    Return GetStringValue(input, columnIndex, "")
  End Function

  ''' <summary>
  ''' Gets the value of the specified column as a string.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <param name="nullValue">The <see cref="String">String</see> value to return if the desired column contains a null value.</param>
  ''' <returns>The <see cref="String">String</see> value of the specified column.</returns>
  ''' <remarks>No conversions are performed; therefore, the data retrieved must already be a string.</remarks>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the VarChar (string) value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtRequisitionNumber.Text = drPageData.GetInt64Value(3, GenerateRequisitionNumber).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtRequisitionNumber.Text = drPageData.GetInt64Value(3, GenerateRequisitionNumber()).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetStringValue(ByVal input As IDataReader, _
                                               ByVal columnIndex As Integer, _
                                               ByVal nullValue As String) As String

    ' Variable Declarations
    Dim strReturnValue As String

    ' Get the value from the data reader
    Try
      If input.IsDBNull(columnIndex) = False Then
        strReturnValue = input.GetString(columnIndex)
      Else
        strReturnValue = nullValue
      End If
    Catch ex As Exception
      strReturnValue = nullValue
    End Try

    ' Return the results
    Return strReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column in its native format.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnName">Name of the column to retrieve the desired data from.</param>
  ''' <param name="nullValue">The value to return if the desired column contains a null value.</param>
  ''' <returns>The value of the specified column.</returns>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtRequisitionNumber.Text = drPageData.GetInt64Value("RequisitionNumber", GenerateRequisitionNumber).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtRequisitionNumber.Text = drPageData.GetInt64Value("RequisitionNumber", GenerateRequisitionNumber()).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetValue(ByVal input As IDataReader, _
                                         ByVal columnName As String, _
                                         ByVal nullValue As Object) As Object

    ' Variable Declarations
    Dim objReturnValue As Object

    ' Get the value from the data reader
    Try
      Dim intOrdinal As Integer = input.GetOrdinal(columnName)
      If input.IsDBNull(intOrdinal) = False Then
        objReturnValue = input.GetValue(intOrdinal)
      Else
        objReturnValue = nullValue
      End If
    Catch ex As Exception
      objReturnValue = nullValue
    End Try

    ' Return the results
    Return objReturnValue

  End Function

  ''' <summary>
  ''' Gets the value of the specified column in its native format.
  ''' </summary>
  ''' <param name="input">The <see cref="IDataReader">IDataReader</see> containing the desired data.</param>
  ''' <param name="columnIndex">The zero-based column ordinal.</param>
  ''' <param name="nullValue">The value to return if the desired column contains a null value.</param>
  ''' <returns>The value of the specified column.</returns>
  ''' <example>
  '''   <para>The following examples populates a textbox based upon the value from the database specifying a default value when the database value is Null.</para>
  '''   <code language="vb">
  '''     Public Sub Populate()
  '''       Dim drPageData As IDataReader = CaseFile_GetData(hidCaseFileID.Value.ToInt32)
  '''       txtRequisitionNumber.Text = drPageData.GetInt64Value(3, GenerateRequisitionNumber).ToString
  '''     End Sub
  '''   </code>
  '''   <code language="c#">
  '''     public void Populate()
  '''     {
  '''     	IDataReader drPageData = CaseFile_GetData(hidCaseFileID.Value.ToInt32);
  '''     	txtRequisitionNumber.Text = drPageData.GetInt64Value(3, GenerateRequisitionNumber()).ToString;
  '''     }
  '''   </code>
  ''' </example>
  ''' <revisions>
  '''   <revision date="11/02/2008" author="Chad Green" version="1.0.0.0">Initial Development</revision>
  ''' </revisions>
  <Extension()> Public Function GetValue(ByVal input As IDataReader, _
                                         ByVal columnIndex As Integer, _
                                         ByVal nullValue As Object) As Object

    ' Variable Declarations
    Dim objReturnValue As Object

    ' Get the value from the data reader
    Try
      If input.IsDBNull(columnIndex) = False Then
        objReturnValue = input.GetValue(columnIndex)
      Else
        objReturnValue = nullValue
      End If
    Catch ex As Exception
      objReturnValue = nullValue
    End Try

    ' Return the results
    Return objReturnValue

  End Function

End Module